interface InterfaceOne {
    //
    sports():void;
}
interface InterfaceTwo {
    //
    swimming():void
}
// 接口集成接口
interface InterfaceThree extends InterfaceOne,InterfaceTwo {
    //
    coding():void;
}

class ParentCls{
    name:string;
    constructor(name:string){
        this.name = name
    }
    //
    ktv(){
        console.log(this.name + '唱歌');
    }
}
// 继承父类实现多接口
class SubCls extends ParentCls implements InterfaceTwo, InterfaceOne {
    
    // 实现接口
    sports(){
        console.log(this.name + '运动')
    }

    swimming(){
        console.log(this.name + '游泳')
    }
}
let subCls = new SubCls('小明');
subCls.sports()
subCls.swimming();
subCls.ktv()

//里面必须要有 coding sports swimming 因为 implements  InterfaceThree
class SubCls2 extends ParentCls implements InterfaceThree {
    //
    coding(){
        console.log(this.name + '写代码');
    }
    sports(){
        console.log(this.name + '运动');
    }
    swimming(){
        console.log(this.name + '游泳')
    }
}
let subCls2 = new SubCls2('小王');
subCls2.coding();
subCls2.sports();
subCls2.ktv();
subCls.swimming();



interface One{
    singging():void
}

interface Two{
    swimming():void
}

interface NumObj{
    num1:number,
    num2:number
}

// 接口继承接口
// interface Three extends One,Two{
//     number(obj:NumObj):number
// }

class MyCls{
    name:string;
    constructor(name:string){
         this.name=name
    }
    sports(){
        console.log(this.name + '运动')
    }
}

class MySubCls extends MyCls implements One,Two{
    singging(){
      console.log(this.name+'在唱歌')
    }

    swimming(){
        console.log(this.name+'在游泳')
    }
}

let person =new MySubCls('张三')
person.singging()
person.swimming()